package component;

import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;

public class J12_FlowLayout extends JFrame{

	public J12_FlowLayout(){
		setDefaultLookAndFeelDecorated(true);
		setTitle("FlowLayout - 수평배치");
		setLayout(new FlowLayout(FlowLayout.CENTER,40,40));
		setBounds(200,250,450,300);
		
		for(int i = 1; i< 11; i++){
			add(new JButton("버튼 : "+i));
		}
		setVisible(true);
	}
	
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			
			@Override
			public void run() {
				// TODO Auto-generated method stub
				new J12_FlowLayout();
			}
		});
	}
	
}
